package trainfengxing.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import trainfengxing.mapper.HotelMapper;
import trainfengxing.pojo.Hotel;
import trainfengxing.service.HotelService;

import java.util.List;

@Service
public class HotelServiceImpl implements HotelService {
    @Autowired
    private HotelMapper hotelMapper;

    @Override
    public List<Hotel> getAllHotels() {
        return hotelMapper.getAllHotels();
    }

    @Override
    public Hotel getHotelById(Integer hotelID) {
        return hotelMapper.getHotelById(hotelID);
    }

    @Override
    public void addHotel(Hotel hotel) {
        hotelMapper.addHotel(hotel);
    }

    @Override
    public void updateHotel(Hotel hotel) {
        hotelMapper.updateHotel(hotel);
    }

    @Override
    public void deleteHotel(Integer hotelID) {
        hotelMapper.deleteHotel(hotelID);
    }
}